package com.woniuxy.rbac.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 角色实体类
 *
 * @Auther: L
 */
@JsonIgnoreProperties({"handler"})
public class Role implements Serializable {
   // @Min(value = 1, message = "id必须是正整数")
    private int id;
   // @Size(min = 5, max = 10, message = "角色名的长度应该是{min}-{max}位")
    private String name;
    private String description;
    private String status;
    private List<Perm> perms;  //权限列表

    public List<Perm> getPerms() {
        return perms;
    }

    public void setPerms(List<Perm> perms) {
        this.perms = perms;
    }

    public static final String ENABLE = "y";
    public static final String DISABLED = "n";

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
